Skip to content

Conversation

@UNIkeEN
Copy link
Owner

@UNIkeEN UNIkeEN commented Dec 26, 2025

Checklist

  • Changes have been tested locally and work as expected.
  • All tests in workflows pass successfully.
  • Documentation has been updated if necessary.
  • Code formatting and commit messages align with the project's conventions.
  • Comments have been added for any complex logic or functionality if possible.

This PR is a ..

  • 🆕 New feature
  • 🐞 Bug fix
  • 🛠 Refactoring
  • ⚡️ Performance improvement
  • 🌐 Internationalization
  • 📄 Documentation improvement
  • 🎨 Code style optimization
  • ❓ Other (Please specify below)

Related Issues

close #1226

Description

  • Please insert your description here and provide info about the "what" this PR is solving.

Additional Context

  • Add any other relevant information or screenshots here.

@UNIkeEN UNIkeEN changed the title [WIP]feat(account): support importing hmcl accounts [WIP] feat(account): support importing hmcl accounts Dec 26, 2025
@UNIkeEN UNIkeEN marked this pull request as ready for review January 17, 2026 08:37
@UNIkeEN UNIkeEN requested a review from Copilot January 17, 2026 08:38
@UNIkeEN UNIkeEN requested a review from xunying123 January 17, 2026 08:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements account import functionality from other Minecraft launchers (specifically HMCL). It's marked as WIP (Work in Progress) and adds a two-stage import process: retrieving account information from external launchers, then importing selected accounts and auth servers into SJMCL.

Changes:

  • Added new ImportLauncherType enum and two new account service methods for importing external account data
  • Created ImportAccountInfoModal component with UI for selecting accounts and auth servers to import
  • Implemented HMCL account parsing logic in Rust, supporting offline, Microsoft, and third-party accounts
  • Added comprehensive localization support for import functionality in English and Chinese

Reviewed changes

Copilot reviewed 17 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/services/account.ts Added two new service methods for retrieving and importing external launcher account info
src/pages/accounts.tsx Integrated import modal into accounts page UI
src/components/modals/import-account-info-modal.tsx New modal component for account import workflow
src/enums/account.ts Added ImportLauncherType enum for supported launchers
src/components/common/selectable-card.tsx Removed conditional margin styling
src/locales/*.json Added translations for import functionality and moved generic "import" button text
src-tauri/src/lib.rs Registered two new Tauri commands for account import
src-tauri/src/account/models.rs Refactored Player::from to support custom auth server lists
src-tauri/src/account/helpers/import/*.rs New import module with HMCL parser implementation
src-tauri/src/account/commands.rs Implemented retrieve and import commands for external accounts
src-tauri/src/account/helpers/authlib_injector/*.rs Refactored to support empty texture properties
public/images/icons/external/*.png Added launcher icons for SCL and PCL

@UNIkeEN UNIkeEN changed the title [WIP] feat(account): support importing hmcl accounts feat(account): support importing hmcl accounts Jan 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 17 out of 20 changed files in this pull request and generated no new comments.

@UNIkeEN UNIkeEN merged commit 5fc225c into main Jan 17, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 支持从其他启动器导入账户信息

4 participants